<template>
	<!-- withdrawalmanagement提现管理 -->
	<view class="w_wp">
		<view class="w_nav">
			<view class="w_n_item">
				<view>可提现金额</view>
				<view class="w_nav_number">{{info.use_money}}</view>
			</view>
			<view class="total">累计提现<text>{{info.sended_money}}</text></view>
		</view>
		<view class="title">提现店铺明细</view>
		<view class="list">
			<view class="item" v-for="(item,index) in list" :key="item.uid" @click="$navTo('/pages/groupmenu/withdrawal?uid='+item.uid)">
				<image :src="item.logo"></image>
				<view class="info">
					<view class="tit clamp">{{item.supname}}</view>
					<view class="type">可提现金额<text>{{item.use_money}}</text></view>
					<view class="name">累积提现金额<text>{{item.sended_money}}</text></view>
				</view>
			</view>
			<view class="empty_loading">
				<image v-show="isloading" src="/static/business/loading.gif" mode=""></image>
				<text v-show="!ismore">到底了~</text>
			</view>
		</view>
		<!-- <view class="w_buttons">
			<view @click="$navTo('/pages/groupmenu/withdrawal')" class="w_buttons_item withdrawal_buttons">提现</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					use_money: 0
				},
				list: [],
				isloading: false,
				ismore: false,
				page: 0,
				
			}
		},
		onReachBottom() {
			this.getlist();
		},
		onLoad() {
			this.getinfo();
			this.getlist();
		},
		methods: {
			getinfo() {
				this.$axios('groupPay/main', 'POST', 'supplier').then(res => {
					if (res.data.code == 200) {
						this.info = res.data.data.info;
					}
				})
			},
			getlist() {
				this.page++;
				this.isloading = true;
				this.$axios('groupManager/suplist', 'POST', 'supplier').then(res => {
					this.isloading = false;
					if (res.data.code == 200) {
						this.list = [...this.list, ...res.data.data];
						this.ismore = res.data.data.length > 0;
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f2f2f2;
		color: $font-color-dark;
	}

	.w_wp {
		padding-bottom: 140upx;
	}

	.w_nav {
		background: linear-gradient( 180deg, #4B05A7 0%, #A34DE8 100%);
		color: #fff;
		text-align: center;
		.w_n_item{
			font-size: 28rpx;
			padding: 32rpx 0;
			.w_nav_number{
				font-size: 72rpx;
				color: #FFFFFF;
				font-weight: 600;
				margin-top: 10rpx;
			}
		}
		.total{
			width: 100%;
			height: 82rpx;
			background: #8615E1;
			font-size: 28rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #ffffffd9;
			text{
				font-size: 48rpx;
				font-weight: 600;
				margin-left: 40rpx;
				color: #FFFFFF;
			}
		}
	}
	.title{
		text-align: center;
		font-size: 32rpx;
		color: #333333;
		font-weight: 600;
		line-height: 3;
	}
	.list{
		padding: 0 20rpx;
		.item{
			background: #FFFFFF;
			border-radius: 12rpx;
			padding: 20rpx;
			margin-bottom: 20rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
				image{
					width: 144rpx;
					height: 144rpx;
					border-radius: 12rpx;
				}
				.info{
					width: calc(100% - 144rpx);
					padding-left: 20rpx;
					font-size: 20rpx;
					line-height: 1.4;
					color: #333333;
					.tit{
						font-size: 28rpx;
						font-weight: 600;
					}
					.type{
						text{
							font-size: 32rpx;
							font-weight: 600;
							color: #8615E1;
							padding-left: 10rpx;
						}
					}
					.name{
						text{
							color: #333333;
							font-size: 32rpx;
							font-weight: 600;
							padding-left: 10rpx;
						}
					}
				}
		}
	}
</style>
